home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 52
/
Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso
/
Aminet
/
game
/
misc
/
WormWars.lha
/
WormWars
/
Source
/
same.h
< prev
next >
Wrap
C/C++ Source or Header
|
2002-10-21
|
27KB
|
832 lines
/* $Filename: WormWars/Source/same.h
* $VER: WormWars 7.21a
* $Description: Header file for Worm Wars
*
* © Copyright 2002 James R. Jacobs.
SAME ON EACH PLATFORM -------------------------------------------------- */
#define elif else if
#define AGLOBAL ; /* global (project-scope) */
#define MODULE static /* external static (file-scope) */
#define PERSIST static /* internal static (function-scope) */
#define AUTO auto /* automatic (function-scope) */
/* miscellaneous */
#define CAUSEWAIT 100
#define DATELENGTH 8 /* DD/MM/YY */
#define TIMELENGTH 5 /* HH:MM */
#define DEFAULTLEVELS 5
#define HISCORES 4
#define LIFEMODULO 1000
#define MAXLEVELS 50 /* assert (MAXLEVELS >= 1 && MAXLEVELS <= 99); */
#define NAMELENGTH 21 /* 0..20 are TEXT, 21 is NULL */
#define NOMODE 0
#define NUMKEYS 28
#define PATIENCE 100
#define SAYLIMIT ((ENDXPIXEL - STARTXPIXEL) / FONTX)
#define VERSION "$VER: Worm Wars 7.21a (21.10.2002)" // always d.m.y format
#define HISCORESIZE (6 + NAMELENGTH + 1 + DATELENGTH + 1 + TIMELENGTH + 1)
#define IBMFIELDX 57
#define AMIGAFIELDX 44
#ifdef PLATFORM_AMIGA
#define FIELDX AMIGAFIELDX
#endif
#ifdef PLATFORM_IBM
#define FIELDX IBMFIELDX
#endif
#define FIELDY 39 /* in squares */
#define LEVELSIZE ((AMIGAFIELDX + 1) * (FIELDY + 1))
#define ARROWX (FIELDX + 1)
#define CENTREX (FIELDX / 2)
#define CENTREY (FIELDY / 2)
#define ENDXPIXEL ((STARTXPIXEL + SQUAREX * (FIELDX + 1)) - 1)
#define ENDYPIXEL ((STARTYPIXEL + SQUAREY * (FIELDY + 1)) - 1)
#define BONUS_TAIL 1
#define BONUS_TIME 10
#define BONUS_NUMBER 50
#define BONUS_LEVEL 100
/* samples */
#define FXBORN_DOG 0
#define FXBORN_DRIP 1
#define FXBORN_GOAT 2
#define FXBORN_MISSILE 3
#define FXBORN_ORB 4
#define FXBORN_PENGUIN 5
#define FXBORN_PROTECTOR 6
#define FXDEATH_FRAGMENT 7 // thud
#define FXDEATH_WORM 8
#define FXDO_BOMB 9 // tick
#define FXDO_ENCLOSE 10
#define FXDO_GOAT 11 // fire
#define FXDO_JUMP 12
#define FXDO_ORB 13 // split
#define FXGET_AMMO 14
#define FXGET_CYCLONE 15
#define FXGET_DRIP 16
#define FXGET_GROWER 17
#define FXGET_OBJECT 18
#define FXGET_POWERUP 19
#define FXGET_PULSE 20 // explode
#define FXGET_SKULL 21
#define FXHELP 22
#define FXUSE_AMMO 23
#define FXUSE_ARMOUR 24
#define FXUSE_BOMB 25
#define FXUSE_TELEPORT 26
#define FXBORN_BIRD 27
#define FXPAIN 28 // 28, 29, 30, 31
#define FXAPPLAUSE 32 // after each new hiscore
#define FXGAMEOVER 33 // if all worms are dead
#define FXCELEBRATE 34 // if game succeeded
#define FXCLICK 35 // rundown, keypresses
#define FXLAUNCH 36 // title screen
#define FXRIFF 37 // after each rundown
#define FXSIREN 38 // out of time
#define SAMPLES FXSIREN
#define FXCENTRE FXUSE_TELEPORT
#define FXDO_CLOUD FXDO_GOAT
#define FXFX FXLAUNCH
#define FXRUNDOWN FXCLICK
#define FXUSE_PROTECTOR FXBORN_PROTECTOR
#define PAIN_BIRD 3
#define PAIN_BOMB 3
#define PAIN_CLOUD 3
#define PAIN_DOG 5
#define PAIN_DRIP 5
#define PAIN_FISH 2
#define PAIN_FRAGMENT 3
#define PAIN_GIRAFFE 3
#define PAIN_GOAT 2
#define PAIN_GLOW 4
#define PAIN_HEAD 5
#define PAIN_LIGHTNING 3
#define PAIN_LION 5
#define PAIN_METAL 3
#define PAIN_MISSILE 5
#define PAIN_OCTOPUS 5
#define PAIN_ORB 5
#define PAIN_OTTER 5
#define PAIN_PENGUIN 3
#define PAIN_PROTECTOR 5
#define PAIN_SLAYER 2
#define PAIN_SLIME 2
#define PAIN_STONE 2
#define PAIN_TELEPORT 5
#define PAIN_WHIRLWIND 5
#define PAIN_WORMFIRE 5
#define PAIN_WOOD 2
#define PAIN_ENEMYTAIL 3
#define PAIN_FRIENDLYTAIL 2
#define SCORE_BIRD 40
#define SCORE_CLOUD 20
#define SCORE_FRAGMENT 10
#define SCORE_DOG 20
#define SCORE_DRIP 100
#define SCORE_FISH 20
#define SCORE_GIRAFFE 40
#define SCORE_GOAT 50
#define SCORE_LION 50
#define SCORE_MISSILE 50
#define SCORE_OCTOPUS 60
#define SCORE_ORB 40
#define SCORE_OTTER 150
#define SCORE_PENGUIN 20
#define SCORE_TIMEBOMB 100
#define SCORE_WHIRLWIND 100
/* key types */
#define MOVE 0 /* not AMMO, TRAINER, ONEHUMAN */
#define TRAINER 2 /* not MOVE, AMMO, ONEHUMAN */
#define ONEHUMAN 3 /* not MOVE, AMMO, TRAINER */
/* speeds */
#define VERYFAST 1
#define FAST 2
#define NORMAL 4
#define SLOW 8
#define VERYSLOW 16 /* must be non-0 */
/* The constant NORMAL is used for several purposes:
a) as a speed (therefore must not be VERYFAST, FAST, SLOW
or VERYSLOW);
b) as a blitmode (therefore must not be BLACK or WHITE); and
c) as a pointer (therefore must not be anything that can be
a brush).
stats */
#define AMMOLIMIT 100
#define ARMOURLIMIT 100
#define BIASLIMIT 100
#define GLOWLIMIT 100
#define STARTLIVES 100
#define LIVESLIMIT 200
#define MULTILIMIT 8 /* don't set >8! */
#define POWERLIMIT 6
#define SCORELIMIT 99999999 // 99 million
/* Field values...
These are objects. */
#define AFFIXER 0
#define AMMO 1
#define ARMOUR 2
#define BIAS 3
#define BOMB 4
#define BONUS 5
#define BRAKES 6
#define CLOCK 7
#define CONVERTER 8
#define CUTTER 9
#define CYCLONE 10
#define ENCLOSER 11
#define GLOW 12
#define GROWER 13
#define HEALER 14
#define ICE 15
#define LIFE 16
#define LIGHTNING 17
#define MAGNET 18
#define MISSILE 19
#define MULTIPLIER 20
#define POWER 21
#define PROTECTOR 22
#define PULSE 23
#define PUSHER 24
#define REMNANTS 25
#define SIDESHOT 26
#define SLAYER 27
#define SLOWER 28
#define SWITCHER 29
#define TREASURE 30
#define UMBRELLA 31
#define LASTOBJECT UMBRELLA
/* These are `empty'. */
#define EMPTY (LASTOBJECT + 1)
#define SILVER (LASTOBJECT + 2)
#define GOLD (LASTOBJECT + 3)
#define FIRSTEMPTY EMPTY
#define LASTEMPTY GOLD
#define LASTGOATFIRE LASTEMPTY
/* Nothing special about the following... */
#define TELEPORT (GOLD + 1)
#define FRAGMENT (GOLD + 2)
#define ORB (GOLD + 3)
#define FIRSTPROTECTOR (GOLD + 4)
#define LASTPROTECTOR (GOLD + 7)
#define NUM_1 (GOLD + 8)
#define NUM_9 (GOLD + 16) /* n g */
#define SLIME (GOLD + 17) /* [ */
#define STONE (GOLD + 18) /* [ | */
#define GOAT (GOLD + 19) /* ] | */
#define WOOD (GOLD + 20) /* | */
#define FIRSTTAIL (GOLD + 21) /* | */
#define LASTTAIL (GOLD + 24) /* ] */
#define FIRSTLETTER NUM_1
#define LASTLETTER NUM_9
#define LASTNONE LASTTAIL
#define LETTERS (LASTLETTER - FIRSTLETTER)
#define FISH (LASTTAIL + 1)
#define OTTER (LASTTAIL + 2)
#define FIRSTFIRE (LASTTAIL + 3)
#define LASTFIRE (LASTTAIL + 6)
#define FIRSTMISSILE (LASTTAIL + 7)
#define LASTMISSILE (LASTTAIL + 10)
#define START (LASTTAIL + 11)
#define MUSIC (LASTTAIL + 12)
#define FX (LASTTAIL + 13)
#define ZERO (LASTTAIL + 14)
#define TIMEBOMB ZERO
#define HEAD (ZERO + 10)
#define GREENHEADUP HEAD
#define REDHEADUP (HEAD + 1)
#define BLUEHEADUP (HEAD + 2)
#define YELLOWHEADUP (HEAD + 3)
#define FIRSTHEAD GREENHEADUP
#define LASTHEAD YELLOWHEADUP
#define GREENHEADDOWN (HEAD + 4)
#define REDHEADDOWN (HEAD + 5)
#define BLUEHEADDOWN (HEAD + 6)
#define YELLOWHEADDOWN (HEAD + 7)
#define GREENHEADLEFT (HEAD + 8)
#define REDHEADLEFT (HEAD + 9)
#define BLUEHEADLEFT (HEAD + 10)
#define YELLOWHEADLEFT (HEAD + 11)
#define GREENHEADRIGHT (HEAD + 12)
#define REDHEADRIGHT (HEAD + 13)
#define BLUEHEADRIGHT (HEAD + 14)
#define YELLOWHEADRIGHT (HEAD + 15)
#define GREENGLOWUP (HEAD + 16)
#define REDGLOWUP (HEAD + 17)
#define BLUEGLOWUP (HEAD + 18)
#define YELLOWGLOWUP (HEAD + 19)
#define GREENGLOWDOWN (HEAD + 20)
#define REDGLOWDOWN (HEAD + 21)
#define BLUEGLOWDOWN (HEAD + 22)
#define YELLOWGLOWDOWN (HEAD + 23)
#define GREENGLOWLEFT (HEAD + 24)
#define REDGLOWLEFT (HEAD + 25)
#define BLUEGLOWLEFT (HEAD + 26)
#define YELLOWGLOWLEFT (HEAD + 27)
#define GREENGLOWRIGHT (HEAD + 28)
#define REDGLOWRIGHT (HEAD + 29)
#define BLUEGLOWRIGHT (HEAD + 30)
#define YELLOWGLOWRIGHT (HEAD + 31)
#define METAL (HEAD + 32)
#define FIRSTDRIP (HEAD + 33)
#define DRIP FIRSTDRIP
#define LASTDRIP (HEAD + 36)
#define BLACKENED (HEAD + 37)
#define WHITENED (HEAD + 38)
#define PENGUIN (HEAD + 39)
#define WHIRLWIND (HEAD + 40)
#define DOG (HEAD + 41) /* dog chasing */
#define DOGAWAKENING (HEAD + 42)
#define DOGDORMANT (HEAD + 43)
#define CLOUD (HEAD + 44)
#define ALL (HEAD + 45)
#define FIRSTARROW (HEAD + 46)
#define LASTARROW (HEAD + 49)
#define DYNAMITE (HEAD + 50)
#define OCTOPUS (HEAD + 51)
#define FIRSTMISSILEFRAME (HEAD + 52)
#define BIRD (FIRSTMISSILEFRAME + 20)
#define FIRSTGLOW (BIRD + 5)
#define LASTGLOW (BIRD + 8)
#define FIRSTGRAVE (BIRD + 9)
#define LASTGRAVE (BIRD + 12)
#define FIRSTPAIN (BIRD + 13)
#define LASTPAIN (BIRD + 16)
#define GREENHEAD_NW (LASTPAIN + 1)
#define GREENHEAD_NE (LASTPAIN + 2)
#define GREENHEAD_SW (LASTPAIN + 3)
#define GREENHEAD_SE (LASTPAIN + 4)
#define GREENGLOW_NW (LASTPAIN + 5)
#define GREENGLOW_NE (LASTPAIN + 6)
#define GREENGLOW_SW (LASTPAIN + 7)
#define GREENGLOW_SE (LASTPAIN + 8)
#define REDHEAD_NW (LASTPAIN + 9)
#define REDHEAD_NE (LASTPAIN + 10)
#define REDHEAD_SW (LASTPAIN + 11)
#define REDHEAD_SE (LASTPAIN + 12)
#define REDGLOW_NW (LASTPAIN + 13)
#define REDGLOW_NE (LASTPAIN + 14)
#define REDGLOW_SW (LASTPAIN + 15)
#define REDGLOW_SE (LASTPAIN + 16)
#define BLUEHEAD_NW (LASTPAIN + 17)
#define BLUEHEAD_NE (LASTPAIN + 18)
#define BLUEHEAD_SW (LASTPAIN + 19)
#define BLUEHEAD_SE (LASTPAIN + 20)
#define BLUEGLOW_NW (LASTPAIN + 21)
#define BLUEGLOW_NE (LASTPAIN + 22)
#define BLUEGLOW_SW (LASTPAIN + 23)
#define BLUEGLOW_SE (LASTPAIN + 24)
#define YELLOWHEAD_NW (LASTPAIN + 25)
#define YELLOWHEAD_NE (LASTPAIN + 26)
#define YELLOWHEAD_SW (LASTPAIN + 27)
#define YELLOWHEAD_SE (LASTPAIN + 28)
#define YELLOWGLOW_NW (LASTPAIN + 29)
#define YELLOWGLOW_NE (LASTPAIN + 30)
#define YELLOWGLOW_SW (LASTPAIN + 31)
#define YELLOWGLOW_SE (LASTPAIN + 32)
#define GIRAFFE (LASTPAIN + 33)
#define LION (LASTPAIN + 34)
#define BLACKARROW (LASTPAIN + 35)
#define ARROWUP (LASTPAIN + 36)
#define ARROWDOWN (LASTPAIN + 37)
#define FROST (LASTPAIN + 38)
#define ARRAYSIZE FROST
#define ANYTHING STONE // should be something that is valid field contents
/* These have no imagery. */
#define TEMPTAIL (ARRAYSIZE + 1)
#define TEMPWOOD TEMPTAIL
#define TEMPSLIME TEMPTAIL
#define TEMPLIGHTNING TEMPTAIL
#define TEMPSILVER (ARRAYSIZE + 2)
#define TEMPGOLD (ARRAYSIZE + 3)
#define NOSQUARE (ARRAYSIZE + 4)
#define BANGDYNAMITE (ARRAYSIZE + 5)
#define TEMPBANGDYNAMITE (ARRAYSIZE + 6)
#define TEMPDYNAMITE (ARRAYSIZE + 7)
// tails
#define GN_E_NE 0
#define GN_NE_E GN_E_NE
#define GN_E_S 1
#define GN_S_E GN_E_S
#define GN_E_SE 2
#define GN_SE_E GN_E_SE
#define GN_NE_SE 3
#define GN_SE_NE GN_NE_SE
#define GN_NE_SW 4
#define GN_SW_NE GN_NE_SW
#define GN_NW_E 5
#define GN_E_NW GN_NW_E
#define GN_NW_NE 6
#define GN_NE_NW GN_NW_NE
#define GN_NW_SE 7
#define GN_SE_NW GN_NW_SE
#define GN_NW_SW 8
#define GN_SW_NW GN_NW_SW
#define GN_N_E 9
#define GN_E_N GN_N_E
#define GN_N_NE 10
#define GN_NE_N GN_N_NE
#define GN_N_NW 11
#define GN_NW_N GN_N_NW
#define GN_N_S 12
#define GN_S_N GN_N_S
#define GN_N_SE 13
#define GN_SE_N GN_N_SE
#define GN_N_SW 14
#define GN_SW_N GN_N_SW
#define GN_N_W 15
#define GN_W_N GN_N_W
#define GN_SW_E 16
#define GN_E_SW GN_SW_E
#define GN_SW_SE 17
#define GN_SE_SW GN_SW_SE
#define GN_S_NE 18
#define GN_NE_S GN_S_NE
#define GN_S_NW 19
#define GN_NW_S GN_S_NW
#define GN_S_SE 20
#define GN_SE_S GN_S_SE
#define GN_S_SW 21
#define GN_SW_S GN_S_SW
#define GN_W_E 22
#define GN_E_W GN_W_E
#define GN_W_NE 23
#define GN_NE_W GN_W_NE
#define GN_NW_W 24
#define GN_W_NW GN_NW_W
#define GN_W_S 25
#define GN_S_W GN_W_S
#define GN_W_SE 26
#define GN_SE_W GN_W_SE
#define GN_W_SW 27
#define GN_SW_W GN_W_SW
#define GG_NE_E 28
#define GG_E_NE GG_NE_E
#define GG_NE_S 29
#define GG_S_NE GG_NE_S
#define GG_NE_W 30
#define GG_W_NE GG_NE_W
#define GG_NW_E 31
#define GG_E_NW GG_NW_E
#define GG_NW_NE 32
#define GG_NE_NW GG_NW_NE
#define GG_NW_S 33
#define GG_S_NW GG_NW_S
#define GG_NW_SE 34
#define GG_SE_NW GG_NW_SE
#define GG_NW_SW 35
#define GG_SW_NW GG_NW_SW
#define GG_NW_W 36
#define GG_W_NW GG_NW_W
#define GG_N_E 37
#define GG_E_N GG_N_E
#define GG_N_NE 38
#define GG_NE_N GG_N_NE
#define GG_N_NW 39
#define GG_NW_N GG_N_NW
#define GG_N_S 40
#define GG_S_N GG_N_S
#define GG_SE_E 41
#define GG_E_SE GG_SE_E
#define GG_SE_N 42
#define GG_N_SE GG_SE_N
#define GG_SE_W 43
#define GG_W_SE GG_SE_W
#define GG_SW_E 44
#define GG_E_SW GG_SW_E
#define GG_SW_N 45
#define GG_N_SW GG_SW_N
#define GG_SW_NE 46
#define GG_NE_SW GG_SW_NE
#define GG_SW_SE 47
#define GG_SE_SW GG_SW_SE
#define GG_SW_W 48
#define GG_W_SW GG_SW_W
#define GG_S_E 49
#define GG_E_S GG_S_E
#define GG_S_SE 50
#define GG_SE_S GG_S_SE
#define GG_S_SW 51
#define GG_SW_S GG_S_SW
#define GG_W_E 52
#define GG_E_W GG_W_E
#define GG_W_N 53
#define GG_N_W GG_W_N
#define GG_W_S 54
#define GG_S_W GG_W_S
#define GG_NE_SE 55
#define GG_SE_NE GG_NE_SE
#define RN_E_NE 56
#define RN_NE_E RN_E_NE
#define RN_E_S 57
#define RN_S_E RN_E_S
#define RN_E_SE 58
#define RN_SE_E RN_E_SE
#define RN_NE_SE 59
#define RN_SE_NE RN_NE_SE
#define RN_NW_E 60
#define RN_E_NW RN_NW_E
#define RN_NW_NE 61
#define RN_NE_NW RN_NW_NE
#define RN_NW_S 62
#define RN_S_NW RN_NW_S
#define RN_NW_SE 63
#define RN_SE_NW RN_NW_SE
#define RN_NW_SW 64
#define RN_SW_NW RN_NW_SW
#define RN_N_E 65
#define RN_E_N RN_N_E
#define RN_N_NE 66
#define RN_NE_N RN_N_NE
#define RN_N_NW 67
#define RN_NW_N RN_N_NW
#define RN_N_S 68
#define RN_S_N RN_N_S
#define RN_N_SE 69
#define RN_SE_N RN_N_SE
#define RN_N_W 70
#define RN_W_N RN_N_W
#define RN_S_SE 71
#define RN_SE_S RN_S_SE
#define RN_SW_E 72
#define RN_E_SW RN_SW_E
#define RN_N_SW 73
#define RN_SW_N RN_N_SW
#define RN_S_SW 74
#define RN_SW_S RN_S_SW
#define RN_SW_SE 75
#define RN_SE_SW RN_SW_SE
#define RN_S_NE 76
#define RN_NE_S RN_S_NE
#define RN_W_E 77
#define RN_E_W RN_W_E
#define RN_W_NE 78
#define RN_NE_W RN_W_NE
#define RN_NW_W 79
#define RN_W_NW RN_NW_W
#define RN_W_S 80
#define RN_S_W RN_W_S
#define RN_W_SE 81
#define RN_SE_W RN_W_SE
#define RN_W_SW 82
#define RN_SW_W RN_W_SW
#define RN_NE_SW 83
#define RN_SW_NE RN_NE_SW
#define RG_E_S 84
#define RG_E_SW 85
#define RG_NE_E 86
#define RG_NE_N 87
#define RG_NE_S 88
#define RG_NE_SE 89
#define RG_NE_SW 90
#define RG_NE_W 91
#define RG_NW_E 92
#define RG_NW_N 93
#define RG_NW_NE 94
#define RG_NW_S 95
#define RG_NW_SE 96
#define RG_NW_SW 97
#define RG_NW_W 98
#define RG_N_E 99
#define RG_N_S 100
#define RG_N_SE 101
#define RG_N_SW 102
#define RG_N_W 103
#define RG_SE_E 104
#define RG_SE_S 105
#define RG_SW_S 106
#define RG_SW_SE 107
#define RG_SW_W 108
#define RG_W_E 109
#define RG_W_S 110
#define RG_W_SE 111
#define RG_S_E 84
#define RG_SW_E 85
#define RG_E_NE 86
#define RG_N_NE 87
#define RG_S_NE 88
#define RG_SE_NE 89
#define RG_SW_NE 90
#define RG_W_NE 91
#define RG_E_NW 92
#define RG_N_NW 93
#define RG_NE_NW 94
#define RG_S_NW 95
#define RG_SE_NW 96
#define RG_SW_NW 97
#define RG_W_NW 98
#define RG_E_N 99
#define RG_S_N 100
#define RG_SE_N 101
#define RG_SW_N 102
#define RG_W_N 103
#define RG_E_SE 104
#define RG_S_SE 105
#define RG_S_SW 106
#define RG_SE_SW 107
#define RG_W_SW 108
#define RG_E_W 109
#define RG_S_W 110
#define RG_SE_W 111
#define BN_E_NE 112
#define BN_E_S 113
#define BN_E_SE 114
#define BN_N_E 115
#define BN_N_NE 116
#define BN_N_NW 117
#define BN_N_S 118
#define BN_N_SE 119
#define BN_N_SW 120
#define BN_N_W 121
#define BN_NE_S 122
#define BN_NE_SE 123
#define BN_NE_SW 124
#define BN_NW_E 125
#define BN_NW_NE 126
#define BN_NW_S 127
#define BN_NW_SE 128
#define BN_NW_SW 129
#define BN_S_SE 130
#define BN_S_SW 131
#define BN_SW_E 132
#define BN_SW_SE 133
#define BN_W_E 134
#define BN_W_NE 135
#define BN_W_NW 136
#define BN_W_S 137
#define BN_W_SE 138
#define BN_W_SW 139
#define BG_E_S 140
#define BG_E_SE 141
#define BG_N_E 142
#define BG_N_NE 143
#define BG_N_NW 144
#define BG_N_S 145
#define BG_N_SE 146
#define BG_N_SW 147
#define BG_N_W 148
#define BG_NE_E 149
#define BG_NE_S 150
#define BG_NE_SE 151
#define BG_NE_SW 152
#define BG_NE_W 153
#define BG_NW_E 154
#define BG_NW_NE 155
#define BG_NW_S 156
#define BG_NW_SE 157
#define BG_NW_SW 158
#define BG_NW_W 159
#define BG_S_SE 160
#define BG_S_SW 161
#define BG_SW_E 162
#define BG_SW_SE 163
#define BG_W_E 164
#define BG_W_S 165
#define BG_W_SE 166
#define BG_W_SW 167
#define YN_E_SE 168
#define YN_E_SW 169
#define YN_N_E 170
#define YN_N_NE 171
#define YN_N_NW 172
#define YN_N_S 173
#define YN_N_SE 174
#define YN_N_SW 175
#define YN_N_W 176
#define YN_NE_E 177
#define YN_NE_S 178
#define YN_NE_SE 179
#define YN_NE_SW 180
#define YN_NW_E 181
#define YN_NW_NE 182
#define YN_NW_S 183
#define YN_NW_SE 184
#define YN_NW_SW 185
#define YN_NW_W 186
#define YN_S_E 187
#define YN_S_SE 188
#define YN_S_SW 189
#define YN_SW_SE 190
#define YN_W_E 191
#define YN_W_NE 192
#define YN_W_S 193
#define YN_W_SE 194
#define YN_W_SW 195
#define YG_E_N 196
#define YG_E_NE 197
#define YG_E_NW 198
#define YG_E_S 199
#define YG_E_SE 200
#define YG_E_SW 201
#define YG_N_NE 202
#define YG_N_NW 203
#define YG_N_S 204
#define YG_N_SE 205
#define YG_N_SW 206
#define YG_N_W 207
#define YG_NE_SE 208
#define YG_NE_SW 209
#define YG_NW_NE 210
#define YG_NW_SE 211
#define YG_NW_SW 212
#define YG_S_NE 213
#define YG_S_NW 214
#define YG_S_SE 215
#define YG_S_SW 216
#define YG_SW_SE 217
#define YG_W_E 218
#define YG_W_NE 219
#define YG_W_NW 220
#define YG_W_S 221
#define YG_W_SE 222
#define YG_W_SW 223
#define WHATEVER 224
#define TAILARRAYSIZE WHATEVER
/* game status */
#define GAMEOVER 0
#define PLAYGAME 1
#define FIELDEDIT 2
#define TITLESCREEN 3
/* indicator locations */
#define ICONY (-1)
#define CLOCKICON (FIELDX + 1)
#define MUSICICON (-1)
/* control values */
#define NONE 0 /* must be 0 */
#define AMIGA 1
#define JOYSTICK 2
#define GAMEPAD 3
#define KEYBOARD 4
#define IBMPC AMIGA
#define MISSILEFRAMES 5
/* PROTOTYPES -------------------------------------------------------------
engine.c */
AGLOBAL void clearhiscores(void);
AGLOBAL void enginesetup(void);
AGLOBAL void gameloop(void);
AGLOBAL void matchteleports(void);
AGLOBAL void newfields(void);
AGLOBAL void newgame(void);
AGLOBAL void timeloop(void);
AGLOBAL void newfield(void);
AGLOBAL void drawhead(SBYTE player, SBYTE x, SBYTE y);
AGLOBAL void drawsquare(SBYTE x, SBYTE y);
AGLOBAL void icon(SBYTE player, UBYTE image);
AGLOBAL void saylevel(COLOUR colour);
AGLOBAL void train(SCANCODE scancode);
AGLOBAL void wormqueue(SBYTE player, SBYTE deltax, SBYTE deltay);
AGLOBAL void wormscore(SBYTE player, ULONG score);
AGLOBAL SBYTE loadfields(STRPTR pathname);
AGLOBAL SBYTE partner(SBYTE which);
AGLOBAL ABOOL savefields(STRPTR pathname);
AGLOBAL SBYTE valid(SBYTE x, SBYTE y);
AGLOBAL SBYTE xwrap(SBYTE x);
AGLOBAL SBYTE ywrap(SBYTE y);
AGLOBAL void align(STRPTR string, SBYTE size, TEXT filler)
/* system.c */
AGLOBAL void celebrate(void);
AGLOBAL void clearkybd(void);
AGLOBAL void clearscreen(void);
AGLOBAL void datestamp(void);
AGLOBAL void gameinput(void);
AGLOBAL void hiscores(void);
AGLOBAL void resettime(void);
AGLOBAL void systemsetup(void);
AGLOBAL void timing(void);
AGLOBAL void titlescreen(void);
AGLOBAL void turborender(void);
AGLOBAL void waitasec(void);
AGLOBAL void cleanexit(SLONG rc);
AGLOBAL void draw(SBYTE x, SBYTE y, UBYTE image);
AGLOBAL void effect(SBYTE index);
AGLOBAL void fileopen(ABOOL revert);
AGLOBAL void filesaveas(ABOOL flag);
AGLOBAL void flash(ULONG where);
AGLOBAL void rundown(SBYTE player);
AGLOBAL void say(STRPTR sentence, COLOUR colour);
AGLOBAL void stat(SBYTE player, SBYTE line);
AGLOBAL void stopfx(void);
AGLOBAL void ReadAdapterJoystick(UBYTE unit);
AGLOBAL void ReadStandardJoystick(ULONG port);
AGLOBAL void ReadGamepads(void);
AGLOBAL ABOOL anykey(ABOOL timeout);
AGLOBAL ABOOL verify(void);
AGLOBAL ABOOL ZOpen(STRPTR fieldname, ABOOL write);
AGLOBAL ABOOL ZRead(STRPTR IOBuffer, ULONG length);
AGLOBAL ABOOL ZWrite(STRPTR IOBuffer, ULONG length);
AGLOBAL ABOOL ZClose(void);
AGLOBAL void help(UBYTE type);
AGLOBAL void helpabout(void);
AGLOBAL void helploop(UBYTE type);
AGLOBAL void toggle(SBYTE key);
AGLOBAL void filedelete(void);
// fe.c
AGLOBAL void fieldedit(void);
AGLOBAL void setbrush(UBYTE newbrush);
// squares.c
AGLOBAL void draw(SBYTE x, SBYTE y, UBYTE image);
// tails.c
AGLOBAL void drawtail(SBYTE x, SBYTE y, UBYTE image);
/* PUBLIC STRUCTURES ------------------------------------------------------ */
AGLOBAL struct HiScoreStruct
{ SBYTE player, level;
ULONG score; /* the score itself */
TEXT name[NAMELENGTH + 2]; /* name of the player */
ABOOL fresh; /* is the entry new? */
TEXT date[DATELENGTH + 1], /* date of achievement */
time[TIMELENGTH + 1]; /* time of achievement */
};
AGLOBAL struct WormStruct
{ SBYTE x, y, deltax, deltay, position, posidir, victor,
statx, staty, pos, levelreached, arrowy, olddeltax, olddeltay,
numbers;
ABOOL affixer, brakes, encloser, remnants, alive, moved, pusher,
sideshot, flashed, rammed, frosted;
UBYTE speed, control, cause, last, multi, power;
SWORD armour, ammo, bias, cutter, lives, glow;
ULONG score, oldscore, hiscore, dynamitescore, causewait, port;
TEXT name[NAMELENGTH + 1];
COLOUR colour, dimcolour;
};
AGLOBAL struct TeleportStruct
{ SBYTE x, y;
ABOOL alive;
};
/* Must have blank line at EOF. */